package com.zrrd.io.propertiesDemo;

import java.util.Properties;
import java.util.Set;

/**
 * @author WanJl
 * @version 1.0
 * @title PropertiesDemo02
 * @description
 * @create 2023/10/15 11:32
 */
public class PropertiesDemo02 {
    public static void main(String[] args) {
        Properties prop = new Properties();
        //赋值
        prop.setProperty("name","张三");
        prop.setProperty("age","25");
        prop.setProperty("sex","男");


        //取值
        String name = prop.getProperty("name");
        System.out.println(name);

        Set<String> strings = prop.stringPropertyNames();
        System.out.println(strings);
    }
}
